<?php 
	include('../conn.php');
	$result_data_array = array();
	function check($filds,$msg){
		if(!$filds){
			$result_data_array['code'] = -100;
			$result_data_array['msg'] = $msg;
			echo json_encode($result_data_array);
			exit;
		}

	}

	$shopid = $_REQUEST['shopid'];
	$head_pic = $_REQUEST['head_pic'];
	$name = $_REQUEST['name'];
	$qq = $_REQUEST['qq'];
	$address = $_REQUEST['address'];
	$lon = $_REQUEST['lon'];
	$lat = $_REQUEST['lat'];
	$huodong_miaoshu = $_REQUEST['huodong_miaoshu'];
	$vr_dizhi = $_REQUEST['vr_dizhi'];
	$wenzi_miaoshu = $_REQUEST['wenzi_miaoshu'];
	$jiage_miaoshu = $_REQUEST['jiage_miaoshu'];
	$content = $_REQUEST['content'];
	$city = $_REQUEST['city'];
	$srcimages = $_REQUEST['srcimages'];
	$images = $_REQUEST['images'];
	$leimu = $_REQUEST['leimu'];
	$zileimu = $_REQUEST['zileimu'];
	$rate = $_REQUEST['rate'];
	$freight_ins = $_REQUEST['freight_ins'];
	$htservice = $_REQUEST['htservice'];
	$licence = $_REQUEST['licence'];

	check($shopid,'商家id不能为空');
	check($name,'店铺名称不能为空');
	check($lon,'经纬度不能为空');
	check($lat,'经纬度不能为空');
	check($huodong_miaoshu,'活动描述不能为空');
	check($wenzi_miaoshu,'商家标签不能为空');
	check($jiage_miaoshu,'折扣描述不能为空');
	check($city,'社区不能为空');
	check($images,'商家主图不能为空');
	check($srcimages,'商家主图不能为空');
	check($head_pic,'头像不能为空');
	check($leimu,'商家分类不能为空');
	check($zileimu,'商家子分类不能为空');
	check($licence,'营业执照不能为空');

	$sql = "update shop set head_pic='".$head_pic."',`name`='".$name."',phone='".$phone."',qq='".$qq."',address='".$address."',longitude='".$lon."',latitude='".$lat."',huodong_miaoshu='".$huodong_miaoshu."',vr_dizhi='".$vr_dizhi."',wenzi_miaoshu='".$wenzi_miaoshu."',jiage_miaoshu='".$jiage_miaoshu."',content='".$content."',city='".$city."',srcimages='".$srcimages."',images='".$images."',leimu='".$leimu."',zileimu='".$zileimu."',freight_ins='".$freight_ins."',htservice='".$htservice."',licence='".$licence."' where shopid = ".$shopid;
	$query = mysql_query($sql);
	if(!$query){
		$result_data_array['code'] = -100;
		$result_data_array['msg'] = '修改失败';
		echo json_encode($result_data_array);
		exit;
	}
	$result_data_array['code'] = 200;
	$result_data_array['msg'] = '修改成功';
	echo json_encode($result_data_array);




 ?>